#include <TString.h>

void q1D(std::string,std::string,std::string,Double_t,Double_t);
void q2D(std::string,std::string,std::string);
void q2D1(std::string,std::string,std::string);


void miplotter()
{
/*
q1D("met_KS1l3j","E_{T}^{miss} [GeV]","Entries/10GeV",1.e-2,1.e3);
q1D("met_KS1l3j_MT","E_{T}^{miss} [GeV]","Entries/10GeV",1.e-2,1.e3);
q1D("met_KS1l3j_MT_MET","E_{T}^{miss} [GeV]","Entries/10GeV",1.e-2,1.e3);

q1D("MT_KS1l3j","M_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);
q1D("MT_KS1l3j_MT","M_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);
q1D("MT_KS1l3j_MT_MET","M_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);

q1D("em_KS1l3j","M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e3);
q1D("em_KS1l3j_MT","M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e3);
q1D("em_KS1l3j_MT_MET","M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e3);


q1D("met_KSbrpv","E_{T}^{miss} [GeV]","Entries/10GeV",1.e-2,1.e3);
q1D("ts_KSbrpv","S_{T}","Entries/0.02",1.e-2,1.e3);
q1D("ht_KSbrpv","H_{T} [TeV]","Entries/40GeV",1.e-2,1.e3);
q1D("em_KSbrpv","M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e3);
q1D("mjj_KSbrpv","m_{jj} [GeV]","Entries/6GeV",1.e-2,1.e3);
q1D("ptjj_KSbrpv","p_{T}(jj) [TeV]","Entries/20GeV",1.e-2,1.e3);
q1D("DeltaRjj_KSbrpv","#Delta R_{jj}","Entries/0.16",1.e-2,1.e3);
q1D("Njj_KSbrpv","Number of jj","Entries/1",1.e-2,1.e3);
q1D("ptx_KSbrpv","p_{T}(#mu jj) [TeV]","Entries/30GeV",1.e-2,1.e3);
q1D("DeltaRx_KSbrpv","#Delta R_{#mu jj}","Entries/0.16",1.e-2,1.e3);
q1D("Nx_KSbrpv","Number of #mu jj","Entries/1",1.e-2,1.e3);
q1D("MT_KSbrpv","M_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);
q1D("MuPt_KSbrpv","#mu p_{T} [GeV]","Entries/20GeV",1.e-2,1.e3);
q1D("MuN","Number of muons","Entries/1",1.e-2,1.e3);
q1D("Mud0exPVe_KSbrpv","#mu d_{0} standardizated","Entries/1",1.e-2,1.e3);
q1D("JetN_KSbrpv","Number of jets","Entries/1",1.e-2,1.e3);
q1D("mx_KSbrpv","m_{#mu jj} [GeV]","Entries/10GeV",16.e-3,5.e2);


q2D("MTvsmet_KS1l3j","E_{T}^{miss} [GeV]","M_{T} [GeV]");
*/
//q2D();
  int nhistos=8;
  for(int i=0; i<nhistos; i++){
    //if(i!=7) continue;
    if(i==3 || i==7){

    q1D(Form("nj_brpv%d",i),"Number of jets","Entries/1",1.e-2,5);
    q1D(Form("nm_brpv%d",i),"Number of muons","Entries/1",1.e-2,5);
    q1D(Form("nw_brpv%d",i),"Number of jj","Entries/1",1.e-2,5);
    q1D(Form("nx_brpv%d",i),"Number of jj#mu","Entries/1",1.e-2,5);

    q1D(Form("met_brpv%d",i),"#slash{E}_{T} [GeV]","Entries/1GeV",1.e-2,1.e1);
    q1D(Form("meff_brpv%d",i),"M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e1);
    q1D(Form("mt_brpv%d",i),"M_{T} [GeV]","Entries/1GeV",1.e-2,1.e1);
    q1D(Form("st_brpv%d",i),"S_{T} [GeV]","Entries/0.02",1.e-2,1.e1);
    q1D(Form("ht_brpv%d",i),"H_{T} [TeV]","Entries/40GeV",1.e-2,1.e1);
    q1D(Form("met_over_meff_brpv%d",i),"#slash{E}_{T}/M_{eff}","Entries/0.02",1.e-2,1.e1);
    q1D(Form("mx_brpv%d",i),"m_{#mu jj} [GeV]","Entries/10GeV",1.e-2,1.e1);
    q1D(Form("mjj_brpv%d",i),"m_{jj} [GeV]","Entries/10GeV",1.e-2,2.e1);
    q1D(Form("DRjj_brpv%d",i),"#Delta R(j,j)","Entries/0.14",1.e-2,5.e3);
    q1D(Form("DRmujj_brpv%d",i),"#Delta R(#mu,jj)","Entries/0.14",1.e-2,6.e1);
    q1D(Form("mupt_brpv%d",i),"muon p_{T} [GeV]","Entries/10GeV",1.e-2,1.e1);
    q1D(Form("jjpt_brpv%d",i),"jj p_{T} [GeV]","Entries/10GeV",1.e-2,2.e1);

    q2D(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");

    q2D1(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D1(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D1(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D1(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D1(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D1(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");

    }

    if(i==4){
    q1D(Form("nj_brpv%d",i),"Number of jets","Entries/1",1.e-2,5.e2);
    q1D(Form("nm_brpv%d",i),"Number of muons","Entries/1",1.e-2,5.e2);
    q1D(Form("nw_brpv%d",i),"Number of jj","Entries/1",1.e-2,5.e2);
    q1D(Form("nx_brpv%d",i),"Number of jj#mu","Entries/1",1.e-2,5.e2);
    q1D(Form("met_brpv%d",i),"#slash{E}_{T} [GeV]","Entries/1GeV",1.e-2,1.e2);
    q1D(Form("meff_brpv%d",i),"M_{eff} [TeV]","Entries/40GeV",1.e-2,3.e2);
    q1D(Form("mt_brpv%d",i),"M_{T} [GeV]","Entries/1GeV",1.e-2,1.e2);
    q1D(Form("st_brpv%d",i),"S_{T}","Entries/0.02",1.e-2,1.e2);
    q1D(Form("ht_brpv%d",i),"H_{T} [TeV]","Entries/40GeV",1.e-2,3.e2);
    q1D(Form("met_over_meff_brpv%d",i),"#slash{E}_{T}/M_{eff}","Entries/0.02",1.e-2,1.e2);
    q1D(Form("mx_brpv%d",i),"m_{#mu jj} [GeV]","Entries/10GeV",1.e-2,2.e2);
    q1D(Form("mjj_brpv%d",i),"m_{jj} [GeV]","Entries/10GeV",1.e-2,3.e2);
    q1D(Form("DRjj_brpv%d",i),"#Delta R(j,j)","Entries/0.14",1.e-2,1.e5);
    q1D(Form("DRmujj_brpv%d",i),"#Delta R(#mu,jj)","Entries/0.14",1.e-2,3.e2);
    q1D(Form("mupt_brpv%d",i),"muon p_{T} [GeV]","Entries/10GeV",1.e-2,5.e2);
    q1D(Form("jjpt_brpv%d",i),"jj p_{T} [GeV]","Entries/10GeV",1.e-2,5.e2);

    q2D(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");

    q2D1(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D1(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D1(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D1(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D1(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D1(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");


    }
    if(i==5 || i==6){
    q1D(Form("nj_brpv%d",i),"Number of jets","Entries/1",1.e-2,1.e2);
    q1D(Form("nm_brpv%d",i),"Number of muons","Entries/1",1.e-2,3.e2);
    q1D(Form("nw_brpv%d",i),"Number of jj","Entries/1",1.e-2,1.e2);
    q1D(Form("nx_brpv%d",i),"Number of jj#mu","Entries/1",1.e-2,1.e2);
    q1D(Form("met_brpv%d",i),"#slash{E}_{T} [GeV]","Entries/1GeV",1.e-2,2.e1);
    q1D(Form("meff_brpv%d",i),"M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e2);
    q1D(Form("mt_brpv%d",i),"M_{T} [GeV]","Entries/1GeV",1.e-2,2.e1);
    q1D(Form("st_brpv%d",i),"S_{T}","Entries/0.02",1.e-2,2.e1);
    q1D(Form("ht_brpv%d",i),"H_{T} [TeV]","Entries/40GeV",1.e-2,1.e2);
    q1D(Form("met_over_meff_brpv%d",i),"#slash{E}_{T}/M_{eff}","Entries/0.02",1.e-2,8.e1);
    q1D(Form("mx_brpv%d",i),"m_{#mu jj} [GeV]","Entries/10GeV",1.e-2,8.e1);
    q1D(Form("mjj_brpv%d",i),"m_{jj} [GeV]","Entries/10GeV",1.e-2,1.e2);
    q1D(Form("DRjj_brpv%d",i),"#Delta R(j,j)","Entries/0.14",1.e-2,1.e4);
    q1D(Form("DRmujj_brpv%d",i),"#Delta R(#mu,jj)","Entries/0.14",1.e-2,1.e2);
    q1D(Form("mupt_brpv%d",i),"muon p_{T} [GeV]","Entries/10GeV",1.e-2,1.e2);
    q1D(Form("jjpt_brpv%d",i),"jj p_{T} [GeV]","Entries/10GeV",1.e-2,2.e2);

    q2D(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");

    q2D1(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D1(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D1(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D1(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D1(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D1(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");


    }
    if(i!=3 && i!=4 && i!=5 && i!=6 && i!=7){
    q1D(Form("nj_brpv%d",i),"Number of jets","Entries/1",1.e-2,1.e3);
    q1D(Form("nm_brpv%d",i),"Number of muons","Entries/1",1.e-2,1.e3);
    q1D(Form("nw_brpv%d",i),"Number of jj","Entries/1",1.e-2,1.e3);
    q1D(Form("nx_brpv%d",i),"Number of jj#mu","Entries/1",1.e-2,1.e3);
    q1D(Form("met_brpv%d",i),"#slash{E}_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);
    q1D(Form("meff_brpv%d",i),"M_{eff} [TeV]","Entries/40GeV",1.e-2,1.e3);
    q1D(Form("mt_brpv%d",i),"M_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);
    q1D(Form("st_brpv%d",i),"S_{T}","Entries/0.02",1.e-2,1.e3);
    q1D(Form("ht_brpv%d",i),"H_{T} [TeV]","Entries/40GeV",1.e-2,1.e3);
    q1D(Form("met_over_meff_brpv%d",i),"#slash{E}_{T}/M_{eff}","Entries/0.02",1.e-2,1.e3);
    q1D(Form("mx_brpv%d",i),"m_{#mu jj} [GeV]","Entries/10GeV",1.e-2,1.e3);
    q1D(Form("mjj_brpv%d",i),"m_{jj} [GeV]","Entries/10GeV",1.e-2,1.e3);
    q1D(Form("DRjj_brpv%d",i),"#Delta R(j,j)","Entries/0.14",1.e-2,1.e5);
    q1D(Form("DRmujj_brpv%d",i),"#Delta R(#mu,jj)","Entries/0.14",1.e-2,1.e3);
    q1D(Form("mupt_brpv%d",i),"muon p_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);
    q1D(Form("jjpt_brpv%d",i),"jj p_{T} [GeV]","Entries/10GeV",1.e-2,1.e3);

    q2D(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");

    q2D1(Form("st_vs_ht_brpv%d",i),"H_{T} [TeV]","S_{T}");
    q2D1(Form("st_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","S_{T}");
    q2D1(Form("st_vs_meff_brpv%d",i),"M_{eff} [TeV]","S_{T}");
    q2D1(Form("st_vs_mt_brpv%d",i),"M_{T} [GeV]","S_{T}");
    q2D1(Form("mt_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_meff_brpv%d",i),"M_{eff} [TeV]","M_{T} [GeV]");
    q2D1(Form("mt_vs_ht_brpv%d",i),"H_{T} [TeV]","M_{T} [GeV]");
    q2D1(Form("ht_vs_met_brpv%d",i),"#slash{E}_{T} [GeV]","H_{T} [TeV]");


    }

  }


}
